import 'package:flutter/material.dart';
class BaseDialog extends Dialog {
  final Widget widget;
  final double height;
  final double width;
  final EdgeInsets magin = null;

  BaseDialog(this.widget, this.height, this.width,
    {Key key, EdgeInsets margin}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    // TODO: implement build
    return new Center(
      child: Padding(
        padding: const EdgeInsets.all(12.0),
        child: Material(
          type: MaterialType.transparency,
          child: Container(
            height: this.height,
            width: this.width,
            decoration: ShapeDecoration(
              color: Colors.white,
              shape: RoundedRectangleBorder(
                borderRadius: BorderRadius.all(
                    Radius.circular(8.0)
                )
              )
            ),
            margin: magin == null ? const EdgeInsets.all(10.0) : magin,
            child: this.widget,
          ),
        ),
      ),
    );
  }
}